﻿@model prufa.ViewModels.MyllaGames
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
<title>User information</title>
</head>

<body>

<fieldset class="nameOfAGame">
    <h2>Leikir sem vanta leikmann</h2>

<table>
    @foreach(var item in Model.JoinableGames){
     <tr> 
        <td><a href="/Game/ActiveMylla/@item.MyllaId" >@Html.DisplayFor(modelItem => item.InstanceName)</a></td>
    </tr>
}
</table>

</fieldset>

<fieldset class="allGames">

    <h2>Leikir sem eru í gangi</h2>

<table>
    @foreach(var item in Model.AllActiveGames){
        <tr>
            <td>@Html.DisplayFor(modelItem => item.InstanceName)</td>
        </tr>
}

</table>

</fieldset>

   @if (Request.IsAuthenticated)
   {
    using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary()

    <fieldset class="instancesOfGames">
        
        <h2> Búðu til þína eigin keppni </h2>

        <div>
            <p>Nafn á leik:</p>
            <input type="text" id="InstanceName" name="InstanceName" value="" />
        </div>
        <input id="aweButton" type="submit" value="Búa til leik"/>

    </fieldset>
}
   }   
</body>

</html>


